Xbasic

SQL::ConnectionGetTableInfo Method

Syntax

Result_Flag as L = SQL::TableInfo GetTableInfo(Info BYREF as SQL::TableInfo, TableName as C [, Owner as C[, Schema as C]])

Arguments

Info BYREFSQL::TableInfo

A SQL::TableInfo object to store the table definition.

TableNameCharacter

The name of the table containing the data.

OwnerCharacter

Default = "". The owner of the table.

SchemaCharacter

A schema.

Returns

Result_FlagLogical

Returns TRUE (.T.) if the operation was successful; otherwise FALSE (.F.).

Description

Get the definition of a table.

Discussion

The GetTableInfo() method retrieves the definition of a table.

Example

dim conn as SQL::Connection
dim ti as SQL::TableInfo
dim connString as C
connString = "{A5API='Access', FileName='c:\program files\a5v8\mdbfiles\alphasports.mdb'}"
if .not. conn.open(connString)
    ui_msg_box("Error", conn.CallResult.text)
    end
end if
if .not. conn.GetTableInfo(ti, "customer")
    ui_msg_box("Error", conn.CallResult.text)
end if
ui_msg_box("Table Information", ti.xml)
conn.close()

See Also